package com.analysis.apresunday.controller;

import com.analysis.apresunday.config.R;
import com.analysis.apresunday.entity.po.AnalysisSalary;
import com.analysis.apresunday.service.AnalysisSalaryService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;

@RestController
@RequestMapping("/analysisSalaryInfo")
@CrossOrigin
@Slf4j
@Tag(name = "平均薪水TOP岗位")
public class AnalysisSalaryController {

    @Resource
    AnalysisSalaryService analysisSalaryService;

    @Operation(summary = "获取薪水前十岗位")
    @GetMapping("/getSalaryTop")
    public R getList(){
        List<AnalysisSalary> list = analysisSalaryService.getSalaryList();
        return R.ok().data("salaryTop",list);
    }

}
